

<div class="dp100">
<h2 class="sepH_b">Thống kê nhân lực RHM - <?php echo $c_city["City"]["name"] ?> - quý <?php echo $c_quarter ?>/<?php echo $c_year ?></h2>

<?php if($notEmpty) { ?>

<script type="text/javascript">
head.ready(function(){
	
	 var s1 = <?php echo $value_s ?>;
    
    // Ticks should match up one for each y value (category) in the series.
    var ticks = <?php echo $tick_s ?>;
     
    var plot1 = $.jqplot('chart_nhdhuman_resource', [s1], {
        // The "seriesDefaults" option is an options object that will
        // be applied to all series in the chart.
        seriesDefaults:{
            renderer:$.jqplot.BarRenderer,
            rendererOptions: {fillToZero: true}
        },
        // Custom labels for the series are specified with the "label"
        // option on the series option.  Here a series option object
        // is specified for each series.
        
        axes: {
            // Use a category axis on the x axis and use our custom ticks.
            xaxis: {
                renderer: $.jqplot.CategoryAxisRenderer,
                ticks: ticks
            },
            // Pad the y axis just a little so bars can get close to, but
            // not touch, the grid boundaries.  1.2 is the default padding.
            yaxis: {
                pad: 1.05,
                tickOptions: {formatString: '%d'},
		padMin: 0
            }
        }
    });
});
</script>


	<div style="width: 700px; height: 250px; margin-bottom: 20px; position: relative;" id="chart_nhdhuman_resource" class="jqplot-target"></div>

	<div style="text-align: right">(Đơn vị: nhân lực)</div>
	
	

	<table cellspacing="0" cellpadding="0" border="0" class="table_a formEl_a smpl_tbl">
		<thead>
			<tr>
				<th width="<?php echo 100/(count($employees)+1) ?>%">Đơn vị RHM</th>			
				
				<?php foreach($employees as $key => $employee) { ?>
					<th width="<?php echo 100/(count($employees)+1) ?>%"><?php echo $employee["Employee"]["name"] ?></th>
				<?php } ?>
				
			</tr>
		</thead>
		<tbody>
			<?php foreach($branches as $b => $branch) { ?>
				<tr>
					<td align="left" class="chb_col" style="font-weight:bold;text-align: left"><?php echo $branch["Branch"]["name"] ?></td>
					<?php foreach($employees as $e => $employee) { ?>
						<td align="right">
							<?php if($values[$branch["Branch"]["id"]][$employee["Employee"]["id"]] != "") echo number_format($values[$branch["Branch"]["id"]][$employee["Employee"]["id"]],0,".", ","); else echo "0"; ?>
						</td>
					<?php } ?>					
				</tr>
			<?php } ?>
			<tr>
				<td  class="chb_col" style="font-weight:bold">TỔNG CỘNG</td>
				<?php foreach($employees as $key => $employee) { ?>
					<td align="right" style="font-weight:bold;"><?php if($employee["total"] != "") echo number_format($employee["total"],0,".", ","); else echo "0"; ?></td>
				<?php } ?>
			</tr>
		</tbody>
	</table>
	<ul>
            <li>Tỉ lệ BS/học sinh: <strong>1/<?php echo $doctor_student ?></strong></li>
	    <li>Tỉ lệ CBRHM/học sinh: <strong>1/<?php echo $nondoctor_student ?></strong></li>
        </ul>
	
<?php } else { ?>

	 <p>Hiện Tỉnh/Thành <?php echo $c_city["City"]["name"] ?> chưa có dữ liệu nhập quý <?php echo $c_quarter ?>/<?php echo $c_year ?>.</p>

<?php } ?>

</div>